<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    div {
      transform-style: preserve-3d;
      perspective: 500px;
      width: 500px;
      height: 200px;
      margin: 0 auto;
      border: 1px solid;
    }
    i {
      display: block;
      width: 100px;
      height: 100px;
      background: #000;
      margin: 50px auto;
      transition: all 4s;
      transform-origin: left center;
    }
    div:hover i{
      /* transform: rotateX(360deg); */
      /* transform: rotateY(360deg); */
      transform: rotateZ(360deg);

    } 
  </style>
</head>
<body>
  <!-- 
    rotateX
    rotateY
    rotateZ

    rotate3d(x, y, z, deg)
      x, y, z是三个矢量

      三个矢量确定一个方向后，然后根据这条线旋转对应的角度

  -->
  <div>
    <i></i>
  </div>
</body>
</html>